<template>
  <div>
    <button class="mr" @click="handleChange('render')">渲染端</button>
    <button @click="handleChange('generate')">生成端</button>
  </div>
  <component :is="componentsName" />


</template>

<script setup lang="ts">
import { ref } from 'vue'
const componentsName = ref(renderPdf)
import renderPdf from './views/renderPdf.vue'
import createForm from './views/createForm.vue'



const handleChange = (type: string) => {
  switch (type) {
    case 'render':
      componentsName.value = renderPdf
      break
    case 'generate':
      componentsName.value = createForm
      break
    default:
      componentsName.value = renderPdf
      break
  }
}



</script>